let numb = 123 as number;
//设置动态接口
interface CacheTs {
    readonly name: string
    [prop: string]: string
};

let cc: CacheTs = {
    name: '张三',
    processName: '测试'
};
//cc.name='里斯' //报错无法分配到 "name" ，因为它是只读属性。
console.log(cc.name);

enum book {
    '天文',
    '地理',
    '文学',
    '言情',
    '科幻'
}
console.log(book[0])

interface people {
    name: string | null | undefined
    age: number | undefined
}
class man implements people {
    name: string | null | undefined = undefined
    age: number | undefined = undefined
    sex: number | null | undefined = undefined
    constructor(name: string, sex: number) {
        this.name = name;
        // super(name);
        this.sex = sex;
    }

}
let p = new man("张三", 1)
console.log(p)